/**
 * A page of event items.
 */
package org.hackystat.ui.sensordatabrowser.client.common;

import java.util.ArrayList;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * @author David J. Nickles
 *
 */
public class EventItemsPage implements IsSerializable {

  /** {@literal} PAGESIZE the maximum number of items on a page. */  
  public static final int PAGESIZE = 100;
  
  private ArrayList dataList;
  private int pageNumber;
  private String status;
  private boolean more;
  
  /**
   * The list of data items on this page.
   * @return the dataList of items on this page.
   * 
   * @gwt.typeArgs <java.util.ArrayList<java.lang.String>>
   */
  public ArrayList getDataList() {
    return dataList;
  }
  
  /**
   * The list of data items on this page.
   * @param dataList the dataList to set.
   * 
   *  @gwt.typeArgs dataList <java.util.ArrayList<java.lang.String>>
   */
  public void setDataList(ArrayList dataList) {
    this.dataList = dataList;
  }
  
  /**
   * The page number of this page.
   * @return the pageNumber of this page.
   */
  public int getPageNumber() {
    return pageNumber;
  }
  
  /**
   * The page number of this page.
   * @param pageNumber the pageNumber to set.
   */
  public void setPageNumber(int pageNumber) {
    this.pageNumber = pageNumber;
  }
  
  /**
   * The status of trying to retrieve this page from the Sensorbase.
   * @return the status of trying to retrieve this page from the Sensorbase.
   */
  public String getStatus() {
    return status;
  }
  
  /**
   * The status of trying to retrieve this page from the Sensorbase.
   * @param status the status to set.
   */
  public void setStatus(String status) {
    this.status = status;
  }

  /**
   * Availability of more data.
   * @return if there is more pages of data available.
   */
  public boolean isMore() {
    return more;
  }

  /**
   * Set the availability of more data.
   * @param more the availability of more data to set.
   */
  public void setMore(boolean more) {
    this.more = more;
  }

  /**
   * No parameters constructor.
   */
  public EventItemsPage() {
    super();
    this.dataList = new ArrayList();
    this.pageNumber = 0;
    this.status = Boolean.TRUE.toString();
    this.more = true;
  }
}
